class HomeTopModel {
  final List<BannerModel> bannerModelList;
  // final List<HotModel> hotModelList;
  static T generateOBJ<T>(json) {
    return HomeTopModel.fromJson(json) as T;
  }

  HomeTopModel(this.bannerModelList);
  HomeTopModel.fromJson(Map<String, dynamic> json)
      : bannerModelList = (json['banner'] as List)
            ?.map((item) => item == null
                ? null
                : new BannerModel.fromJson(item as Map<String, dynamic>))
            ?.toList();

  // factory HomeTopModel.fromJson(Map<String, dynamic> json) {
  //   var list = json['banner'] as List;
  //   List<BannerModel> bannerModelList =
  //       list.map((item) => BannerModel.fromJson(item)).toList();

  //   return HomeTopModel(bannerModelList);
  // }
}

class BannerModel {
  final String thumb;
  final String linkUrl;
  final String type;
  final String itemId;

  BannerModel.fromJson(Map<String, dynamic> json)
      : thumb = json['thumb'],
        linkUrl = json['linkurl'],
        type = json['type'],
        itemId = json['itemid'];
}

class HotModel {}
